<!DOCTYPE html>
<html>
    <head>
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'opportunityContract.label', default: 'OpportunityContract')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
      <div class="small-header">
          <div class="hpanel">
              <div class="panel-body">
                  <div id="hbreadcrumb" class="pull-right">
                      <ol class="hbreadcrumb breadcrumb">
                          <li>Next CRM</li>
                          <li>
                              <g:link controller="opportunity" action="show" id="${this.opportunityContract?.opportunity?.id}">商机详情</g:link>
                          </li>
                          <li class="active">
                              <span>合同详情</span>
                          </li>
                      </ol>
                  </div>

                  <h2 class="font-light m-b-xs">
                      合同详情
                  </h2>
              </div>
          </div>
      </div>

      <div class="content animate-panel">
          <div class="row">
              <div class="hpanel hblue">
                  <div class="panel-heading">

                      <div class="panel-tools">
                              <g:link class="btn btn-info btn-xs" action="edit" resource="${this.opportunityContract}"><i
                                      class="fa fa-edit"></i>编辑</g:link>

                      </div>

                      合同详情
                  </div>
                  <g:if test="${flash.message}">
                  <div class="message" role="status">${flash.message}</div>
                  </g:if>

                  <div class="panel-body form-horizontal">
                      <div class="form-group row">
                          <label class="col-md-3 control-label">合同编号</label>
                          <div class="col-md-4">
                              <span class="cont">${this.opportunityContract?.contract?.serialNumber}</span>
                          </div>
                      </div>
                      <div class="form-group row">
                          <label class="col-md-3 control-label">合同类型</label>
                          <div class="col-md-4">
                              <span class="cont">${this.opportunityContract?.contract?.type?.name}</span>
                          </div>
                      </div>
                      <g:each in="${this.contractItems}">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">${it?.name}</label>
                            <g:if test="${it?.options?.size() > 0}">
                              <div class="col-md-4">
                                  <span class="cont">${it?.value}</span>
                              </div>
                            </g:if>
                            <g:else>
                              <div class="col-md-4">
                                  <span class="cont">${it?.value}</span>
                              </div>
                            </g:else>

                        </div>
                      </g:each>
                  </div>
              </div>
          </div>
      </div>

    </body>
</html>
